﻿using System;
using System.Collections.Generic;
using System.Globalization;

namespace EnumLocalizer
{
    class Program
    {
        static void Main()
        {
            var enumLocalizer = new Yama.Util.EnumLocalizer(typeof (Digits));

            // the above is equivalent to a generic version
            enumLocalizer = new Yama.Util.EnumLocalizer<Digits>();

            foreach (var lang in Languages.CultureInfos)
            {
                System.Threading.Thread.CurrentThread.CurrentUICulture = lang;

                Console.Out.WriteLine(string.Format("Translations in {0}:", lang.DisplayName));
                Console.Out.WriteLine();

                foreach (var digit in enumLocalizer.GetValueNamePairs())
                {
                    Console.Out.WriteLine(string.Format("{0}: {1}", digit.Key, digit.Value));
                }
                Console.WriteLine();
            }

            Console.Read();
        }
    }
}
